<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" isELIgnored="false"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<meta name="Keywords" content="关键词,关键词">
<meta name="description" content="">

<script type="text/javascript" src="js/jquery-1.42.min.js"></script>
<script type="text/javascript" src="js/jquery.js"></script>
<link rel="stylesheet" href="css/base.css" type="text/css" />
<link rel="stylesheet" href="css/headbott.css" type="text/css" />
<!-- Chang URLs to wherever Video.js files will be hosted -->
<link href="css/video-js.css" rel="stylesheet" type="text/css">
<link href="css/product-detail.css" rel="stylesheet" type="text/css">
<!-- video.js must be in the <head> for older IEs to work. -->
<script type="text/javascript" src="js/video.js"></script>
<link rel="stylesheet" href="admin/css/bootstrap.min.css" />
<script type="text/javascript" src="${pageContext.request.contextPath}/admin/js/bootstrap.min.js"></script>
</head>
<body>
<div id="getId" style="display: none;">${psId}</div>
<div id="getuId" style="display: none;">${users.usId}</div>
	<%@include file="/WEB-INF/pages/front/common/cf_head.jsp" %>
	<script>

  var d_var=$(".search .search-txt").val();
    $(".search .search-txt").focus(function(){
        if($(this).val()==d_var){
            $(this).val("");
        }});

    $(".search .search-txt").blur(function(){
        if($(this).val()==""){
            $(this).val("找项目");
        }
    });
</script>

	<div class="p-detail_con">
		<div class="p-detail_contit">
			<h1 id="biaoti"></h1>
			<div class="p-detail_cfx">
				<span class="p-detail_contit"><a href=""><i></i>分享</a></span> <span
					class="p-detail_contit2"><a href=""><i></i>点赞</a></span>
			</div>
			<div class="p-detail_cfx2">
				<ul>
					<li class="p-detail_cfx2-1">发起人</li>
					<li class="p-detail_cfx2-2" id="faqiren"> <span>|</span></li>

					<li class="p-detail_cfx2-3" id="dizhi"> <span>|</span></li>
					<li class="p-detail_cfx2-4">金融</li>
				</ul>
			</div>
		</div>

		<div class="p-detail-tab2">
			<ul>
				<li id="xiang" class="p-detail-tab2-tb">项目主页</li>
				<li id="ping" class="p-detail-tab2-tb2">评论</li>
			</ul>
		</div>
		<div class="p-detail_con2">
			<div class="p-detail_con2l">

				

				<div id="xiangw1" class="p-detail_txt1">

					<h3>项目介绍</h3>
					<p id="p1"></p>
					<p id="p2"></p>
				</div>
				<div id="pingx" class="p-detail_txt1">
				
					<h3>项目评论</h3>
					<p id="ps1"></p>
				</div>
				<div class="detail-bott">
					<p>
						标签：<a href="">短片</a><a href="">电影</a><a href="">bilding</a><a
							href="">love</a>
					</p>
					<div class="detail-bott2">
						<i><img src="images/zcvprod-a_32.png" alt="" /></i>如果你对项目有疑问，可以发起咨询<span><a
							href="javascript:void(0);">对发起人提问</a></span>
					</div>
					<div class="textarea1">
						<textarea class="textarea2"></textarea>

						<form action="">
							
							<input class="textarea2-tji" type="submit" value="提交" />
						</form>
					</div>
					<script>

                    $(".detail-bott2 span a").click(function(){
                        $(".textarea1").toggle();
                    })
                </script>
				</div>
			</div>
			
			<div class="p-detail_con2r">
				<div class="p-detail_con2r1">

					<div class="bot-con1zti">
						<img src="images/zcvprod-a_20.png" alt="" />
					</div>
					<div class="p-detail_con2r1tit">目前累计金额</div>
					<div id="leim" class="p-detail_con2r1min">￥600000.00</div>
					<div class="llloading-bar">
						<div class="loading-bar">
							<div id="xibt" class="amount blue" style="width: 9%">
								<div class="loaded"></div>
								<span id="xib">9%</span>
								<div class="lines"></div>
							</div>
						</div>
					</div>
					<p>
						<span>目标</span><i id="mub">115555555.00</i>
					</p>
					<br>
					<p>
						<span>剩余</span><i id="shengy">115555555.00</i>
					</p>
					<br>
					<p>
						<span>支持者</span><i id="zhic">1155555</i>
					</p>
					<p class="loading-barcolo">项目截止时间：2016年10月25日19时40分</p>

				</div>
				<div class="loading-bzcz">
					<div class="loading-bzcz-1">
						<span>支持￥0.01</span><i>已有<b>2</b>位支持者
						</i>
					</div>
					<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
					 支持
					</button>
					
					
				</div>
				<!-- Modal -->
				<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
				  <div class="modal-dialog" role="document">
				    <div class="modal-content">
				      <div class="modal-header">
				        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
				        <h4 class="modal-title" id="myModalLabel">请输入金额</h4>
				      </div>
				      <div class="modal-body">
				        <form>
				          <div class="form-group">
				            <label for="exampleInputEmail1">请输入金额</label>
				            <input type="text" class="form-control" id="smoney" placeholder="请输入金额">
				          </div>
				         
				        </form>
				      </div>
				      <div class="modal-footer">
				        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
				        <button type="button" class="btn btn-primary" onclick="canyu()">参与项目</button>
				      </div>
				    </div>
				  </div>
				</div>

				<div class="loading-bzcz loading-bzcz2">
					<div class="loading-bzcz-2">付款与退款说明：</div>
					<p>1.项目需在截止日期之前筹资成功</p>
					<p>2.筹资失败的项目将会退款到会员余额中，下 次可以继续使用。如果需要提现的会员，可以 到会员中心点击提现申请！</p>
				</div>

				<div class="loading-bzcz">
					<div class="loading-bzcz-2">发起人信息：</div>
					<div class="detali-fqrxx">
						<div class="detali-fqrxx_header">
							<img src="images/zcvprod-a_28.png" alt="" />
						</div>
						<div class="detali-fqrxx_text">
							<p>fanwe</p>
							<p>上次登陆时间：2015/5/7</p>
							<p class="h">
								<i><img src="images/dt_03.png" alt="" /></i><s>福建 福州</s>
							<h2>
								<img src="images/delite-i_14.png" alt="" />
							</h2>
							</p>
							<p class="h">
								<i><img src="images/zcvprod-a_10.png" alt="" /></i><s>发信息</s>
							</p>
						</div>
					</div>
				</div>
			</div>


		</div>
	</div>
	<div id="bottom">
		<div class="bot-con1">
			<ul>
				<li class="bot-con1-li1">我们已经做到</li>
				<li>单项支持人数<span class="inde-span1"></span></li>
				<li>单项筹款金额<span class="inde-span2"></span></li>
				<li>累计筹款金额<span class="inde-span3"></span></li>
			</ul>
		</div>
		<div class="bot-con1 bot-con2">
			<ul>
				<li class="bot-con1-li1">发起项目流程</li>
				<li><span class="inde-span4"></span>发起人创建项目</li>
				<li><span class="inde-span5"></span>项目获得支持</li>
				<li><span class="inde-span6"></span>发起人发放回报</li>
				<li><span class="inde-span7"></span>用户收到回报</li>
			</ul>
		</div>
		<div class="bottom-ggt">
			<a href=""><img src="images/bottbom_68.jpg" alt="" /></a>
		</div>
		<div class="zc-yqlink">
			<ul>
				<li><a href="">阿里巴巴集团</a></li>
				<li><a href="">淘宝网</a></li>
				<li><a href="">天猫</a></li>
				<li><a href="">聚划算</a></li>
				<li><a href="">全球速卖通</a></li>
				<li><a href="">阿里巴巴国际交易市场</a></li>
				<li><a href="">1688</a></li>
				<li><a href="">阿里妈妈</a></li>
				<li><a href="">阿里旅行</a></li>
				<li><a href="">阿里云计算</a></li>
				<li><a href="">阿里巴巴集团</a></li>
				<li><a href="">淘宝网</a></li>
				<li><a href="">天猫</a></li>
				<li><a href="">聚划算</a></li>
				<li><a href="">全球速卖通</a></li>
				<li><a href="">阿里巴巴国际交易市场</a></li>
				<li><a href="">1688</a></li>
				<li><a href="">阿里妈妈</a></li>
				<li><a href="">阿里云计算</a></li>
			</ul>
		</div>
		<div class="footer-bd">

			<a href=" ">关于淘宝</a> <a href=" ">合作伙伴</a> <a href=" ">营销中心</a> <a
				href=" ">廉正举报</a> <a href=" ">联系客服</a> <a href=" ">开放平台</a> <a
				href=" ">诚征英才</a> <a href=" ">联系我们</a> <a href=" ">网站地图</a> <a
				href=" ">法律声明</a> <em>© 2003-2015 Taobao.com 版权所有</em><br> <br>
			<span>网络文化经营许可证：<a href=" ">浙网文[2013]0268-027号</a></span> <b>|</b> <span
				data-spm-protocol="i">增值电信业务经营许可证：<a href="">浙B2-20080224-1</a></span>
			<b>|</b> <span>信息网络传播视听节目许可证：1109364号</span> <b>|</b> <span>举报电话:0571-81683755</span>
		</div>
	</div>
	<script type="text/javascript">
		$(function(){
			alert("123")
			$("#pingx").css("display","none")
			$("#xiang").on("click",function(){
				$("#xiangw1").css("display","block")
				
				$("#pingx").css("display","none")
				
			})
			$("#ping").on("click",function(){
				$("#pingx").css("display","block")
				
				$("#xiangw1").css("display","none")
				
			})
			$("#zhichi").on("click",function(){
				window.event.stopPropagation()
				
			})
		})
		//得到项目基本信息
		$(function(){
			$.ajax({
				url: "getProjectDetaile",
				dataType: "JSON",
				type: "get",
				data: {
					psId: $("#getId").html()
				},
				success: function(result) {
					var map = result.extend["map"]
					jibenxinxi(map)
					xiangmuxinxi(map)
					xiangmupinglun(map)
					xiangmujindu(map)
				},
				error: function(err) {}
			})
		})
		function jibenxinxi(map){
			var users=map["projects"].users
			var projects = map["projects"]
			var msg = ""
			
			msg+=
				"<tr>"+"<th>客服联系人</th>"+"<td>"+projects.psCustName+"</td>"+"</tr>"+
				"<tr>"+"<th>客服联系电话</th>"+"<td>"+projects.psCustPhone+"</td>"
			$("#p1").html(msg)
		}
		function xiangmuxinxi(map){
			console.log(map)
			var projects = map["projects"]
			var msg=""
			$("#biaoti").html(projects.psName)
			$("#faqiren").html(projects.users.usName)
			$("#dizhi").html(projects.users.usAddress)
			msg+="<tr><th>项目类型</th><td>"+projects.projectsType.pstName+"</td></tr>"+
				"<tr><th>项目标题</th><td>"+projects.psName+"</td></tr>"+
				"<tr><th>筹款目的</th><td>"+projects.psGoal+"</td></tr>"+
				"<tr><th>项目地点</th><td>"+projects.psAddress+"</td></tr>"+
				"<tr><th>筹资金额</th><td>"+projects.psMoney+"</td></tr>"+
				"<tr><th>筹资天数</th><td>"+projects.psDays+"</td></tr>"
				/* "<tr><th>自定义标签</th><td>"xxxxxx,xxx,xx,xx,"</td> */
				/* "</tr><tr><th>封面图</th><td>图片</td></tr>" */
				/* "<tr><th>其它</th><td>这只是个示例</td></tr>" */
				$("#p2").html(msg)
		}
		function xiangmupinglun(map){
			console.log(map)
			var projects = map["projects"]
			if(projects.psType==0){
				$("#xiangmupinglunId_msg").html("未审核")
				//alert(projects.psType)
			}else if(projects.psType==5){
				$("#xiangmupinglunId_msg").html("审核失败")
			}else{
				var msg=""
				$.each(map["page"].list,function(i,item){
					msg+="<tr>"+
						"<th>"+item.cmContent+"</th>"+
						"<th>"+item.users.usName+"</th>"+
						"<th>"+item.cmTime+"</th>"+
						"</tr>"	
				})
				$("#ps1").html(msg)
			}
		}
		function xiangmujindu(map){
			console.log(map)
			var progress = map["progress"]
			var projects = map["projects"]
			
			if(projects.psType==0){
				/* $("#xiangmujinduId_msg").html("未审核") */
				//alert(projects.psType)
			}else if(projects.psType==5){
			/* 	$("#xiangmujinduId_msg").html("审核失败") */
			}else{
				//alert(123)
				var psMoney = projects.psMoney
				var psGetmoney = projects.psGetmoney
				if(progress>1){
					progress = "100%"
				}else{
					progress = parseInt(parseFloat(progress)*100)+"%"
				}
				$("#xbt").css("width",progress)
				$("#xib").html(progress)
				//alert(parseFloat(progress)*100+"%")
				$("#mub").html(psMoney)
				$("#leim").html(psGetmoney)
				if(psMoney-psGetmoney<0){
					var shengm = 0
				}else{
					var shengm = psMoney-psGetmoney
				}
				$("#shengy").html(shengm)
				$("#zhic").html(projects.psGetpeople)
				
				/* var msg=""
				msg += "<tr>"+"<th>项目进度</th>"+"<td>"+progress+"</td>"+"</tr>"+
					"<tr>"+"<th>预筹金额</th>"+"<td>"+psMoney+"</td>"+"</tr>"+
					"<tr>"+"<th>已筹金额</th>"+"<td>"+psGetmoney+"</td>"+"</tr>"	 */
				
				/* $("#xiangmujinduId_tab").html(msg) */
			}
		}
		function canyu(){
			alert($("#getId").html())
			alert($("#getuId").html())
			alert($("#smoney").val())
			$.ajax({
				url: "addFunding",
				dataType: "JSON",
				type: "get",
				data: {
					fdPsId: $("#getId").html(),
					fdUsId:$("#getuId").html(),
					fdMoney:$("#smoney").val(),
					
				},
				success: function(result) {
					alert("充值成功")
					$('#myModal').modal('hide')
					window.location.reload();
					
				},
				error: function(err) {}
			})
		}
	</script>
</body>
</html>